<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%String path = request.getContextPath(); %>    
<jsp:include page="/manage/inc/head.jsp"></jsp:include>
<jsp:include page="/manage/inc/menu.jsp"></jsp:include>  
<%
	int userYcounts =(int)request.getAttribute("userYcounts");
	int userWcounts =(int)request.getAttribute("userWcounts");
	int usersums =(int)request.getAttribute("usersums");
	int cookbookYcounts =(int)request.getAttribute("cookbookYcounts");
	int cookbookWcounts =(int)request.getAttribute("cookbookWcounts");
	int cookbooksums =(int)request.getAttribute("cookbooksums");
	int worksYcounts =(int)request.getAttribute("worksYcounts");
	int worksWcounts =(int)request.getAttribute("worksWcounts");
	int workssums =(int)request.getAttribute("workssums");
	int cookbookTypeCount =(int)request.getAttribute("cookbookTypeCount");
%>  
    <!--/sidebar-->
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font">当前系统时间：</i>
            	<span id="d"></span>
            </div>
        </div>
        <div class="result-wrap">
            <div class="result-title">
                <h1>每日数据统计</h1>
            </div>
            <div class="result-content">
                <div class="short-wrap">
                    <a href="#"><i class="icon-font">&#xe001;</i>昨日新增用户数：<%=userYcounts %></a>
                    <a href="#"><i class="icon-font">&#xe005;</i>昨日新增食谱数：<%=cookbookYcounts %></a>
                    <a href="#"><i class="icon-font">&#xe048;</i>昨日发布作品数：<%=worksYcounts %></a>
                     
                </div>
            </div>
        </div>
        <div class="result-wrap">
            <div class="result-title">
                <h1>每周数据统计</h1>
            </div>
            <div class="result-content">
                <div class="short-wrap">
                   	<a href="#"><i class="icon-font">&#xe041;</i>过去七天新增用户数：<%=userWcounts %></a>
                    <a href="#"><i class="icon-font">&#xe01e;</i>过去七天新增食谱数：<%=cookbookWcounts %></a> 
                    <a href="#"><i class="icon-font">&#xe01e;</i>过去七天发布作品数：<%=worksWcounts %></a>
                </div>
            </div>
        </div>
         <div class="result-wrap">
            <div class="result-title">
                <h1>总数据统计</h1>
            </div>
            <div class="result-content">
                <div class="short-wrap">
                    <a href="#"><i class="icon-font">&#xe001;</i>总用户数：<%=usersums %></a>
                    <a href="#"><i class="icon-font">&#xe005;</i>总食谱数：<%=cookbooksums %></a>
                    <a href="#"><i class="icon-font">&#xe048;</i>总作品数：<%=workssums %></a>
                    <a href="#"><i class="icon-font">&#xe041;</i>总食谱类型数：<%=cookbookTypeCount %></a>
                </div>
            </div>
        </div>
        <div class="result-wrap">
            <div class="result-title">
                <h1>系统基本信息</h1>
            </div>
            <div class="result-content">
                <ul class="sys-info-list">
                    <li>
                        <label class="res-lab">操作系统</label><span class="res-info">win10</span>
                    </li>
                    <li>
                        <label class="res-lab">版本</label><span class="res-info">v1.0</span>
                    </li>
                    <li>
                        <label class="res-lab">服务器域名/IP</label><span class="res-info">localhost [ 127.0.0.1 ]</span>
                    </li>
                    <li>
                        <label class="res-lab">Host</label><span class="res-info">127.0.0.1</span>
                    </li>
                </ul>
            </div>
        </div>
        <div class="result-wrap">
            <div class="result-title">
                <h1>使用帮助</h1>
            </div>
            <div class="result-content">
                <ul class="sys-info-list">
                    <li>
                        <label class="res-lab">官方交流网站：</label><span class="res-info"><a href="javascript:java(0)" target="_blank">吃了吗</a></span>
                    </li>
                    <li>
                        <label class="res-lab">官方交流QQ群：</label><span class="res-info"><a class="qq-link" target="_blank" href="javascript:void(0)">木有，自己建去</a> </span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!--/main-->
    <jsp:include page="/manage/inc/foot.jsp"></jsp:include>
    <script>
    setInterval(s,1000);
    
    function s()
    {
         //获得当前的系统时间  并且显示到div中间
         //Date类
        var today = new Date();//创建Date的对象  调用Date的构造方法 该构造方法获得当前的系统时间

         var year = today.getFullYear();
        var month = today.getMonth()+1;
        var day = today.getDate();
        var hh = today.getHours();
        var min = today.getMinutes();
        var se = today.getSeconds();
        var time = year+"-"+month+"-"+day+"  "+hh+":"+min+":"+se;

        //设置到div  设置div的innerHTML   span  div   p a  td  ......
        var dx = $("#d");//获得div对象
        dx.html(time);//设置div的innerHTML的内容               
    }
    </script>